Chris Pollett > Old Classes >
CS174

( Print View )

Student Corner:
  [Grades Sec1]
  [Grades Sec2]
  [Grades Sec3]

  [Submit Sec1]
  [Submit Sec2]
  [Submit Sec3]

  [Class Sign Up Sec1]
  [Class Sign Up Sec2]
  [Class Sign Up Sec3]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS174 Fall 2007Practice Midterm 2

[Student Generated Solutions-TXT]

To study for the midterm II would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

1. Give a code example and explain how the XSD simpleType and complexType tags work.

2. Briefly explain how a web service can be made available using REST.

3. Write a short PHP function outputGet() which outputs all of the name data sent from a form get'd to your scripts site. Each distinct name should be outputted in its own paragraph.

4. Explain with code examples how the flock function works in PHP.

5. How do sessions work in PHP? How do we store new name value pairs in a session. How are session implemented by PHP using cookies?

6. Give a short PHP code snippet which can open a connection to a mysql database on localhost, connects to the my_db database, and outputs the data from each column and each row of the foo table.

7. Give code to move, using PHP, each file that was uploaded via a form into the PHP script's current directory and with the original filename from the client.

8. Write a short PHP script to send yourself an e-mail which says: "Hi there, long time no see."

9. Briefly explain what a self-signed SSL certificate is and why it will typically cause a web browser to complain.

10. Give the Javascript necessary (assume it will run on modern browser) to request via GET the file bob.html from the server. Your code should handle the response by putting its contents in some div tag.